/**
 * Created by xie on 2018/4/8.
 */
angular.module('module.personalcenter')
    .controller('DissController', DissController);

DissController.$inject = ['$scope','$state','$cookies','$rootScope','PersonalcenterService'];

function DissController($scope, $state,$cookies, $rootScope,PersonalcenterService) {
    var vm = this;
    vm.goArticle=goArticle;
    vm.user=JSON.parse($cookies.get("userInfo"));

    PersonalcenterService.getDissByUserid(vm.user.userid).$promise.then(function(data){
        vm.dissList = data;
        console.log("411",vm.dissList);
    },function(err){
        console.log(err)
    });

    function goArticle(diss){

        $state.go("atricle",{articleid:diss.articleid});
    }


    vm.aa = [
        "images/imggg/touxiang6.jpg",
        "images/imggg/touxiang6.jpg",
        "images/imggg/touxiang6.jpg",
        "images/imggg/touxiang6.jpg",
        "images/imggg/touxiang6.jpg",
        "images/imggg/touxiang6.jpg",
        "images/imggg/touxiang6.jpg",
        "images/imggg/touxiang6.jpg",
        "images/imggg/touxiang6.jpg",
        "images/imggg/touxiang6.jpg",
        "images/imggg/touxiang6.jpg",


    ]
}